
<%@ page import="br.edu.ufam.avaliacao.Avaliacao" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'avaliacao.label', default: 'Avaliacao')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="Início"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="Lista de Avaliações" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="Nova Avaliação" args="[entityName]" /></g:link></span>                        
            </div>
            <div class="body" style="width: 1000px">
                <h1><g:message code="Visualizar Avaliação" /></h1>
            <g:if test="${flash.message}">
                <div class="message">${flash.message}</div>
            </g:if>
            <br>
            <div class="dialog">
                
                        <table>
                        <tr class="prop" style="clear: both; display: none" >
                            <td valign="top" class="name"><g:message code="avaliacao.id.label" default="Id" /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "id")}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.descricao.label" default="Descrição:" /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "descricao")}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.curso.label" default="Curso: " /></td>

                            <td valign="top" class="value"><g:link controller="curso" action="show" id="${avaliacaoInstance?.curso?.id}">${avaliacaoInstance?.curso?.encodeAsHTML()}</g:link></td>

                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.usuario.label" default="Avaliador: " /></td>

                            <td valign="top" class="value"><g:link controller="usuario" action="show" id="${avaliacaoInstance?.usuario?.id}">${avaliacaoInstance?.usuario?.encodeAsHTML()}</g:link></td>
                            </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.status.label" default="Status: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "status")}</td>

                        </tr>
                        </table>
                        <br>
                        <table> <b>Dimensão 1: ORGANIZAÇÃO DIDÁTICO-PEDAGÓGICA </b>
                            
                            <tr class="prop">
                                
                                <td valign="top" class="name"><g:message code="avaliacao.relatoDimensao1.label" default="Relato: " /></td>

                                <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "relatoDimensao1")}</td>

                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name"><g:message code="avaliacao.pesoDimensao1.label" default="Peso: " /></td>

                                <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "pesoDimensao1")+ "%"}</td>

                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name"><g:message code="avaliacao.conceitoDimensao1.label" default="Conceito: " /></td>

                                <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "conceitoDimensao1")}</td>

                            </tr>
                        </table>
                        
                        <br>
                        <table> <b>Dimensão 2: CORPO DOCENTE E TUTORIAL </b>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.relatoDimensao2.label" default="Relato: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "relatoDimensao2")}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.pesoDimensao2.label" default="Peso: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "pesoDimensao2")+ "%"}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.conceitoDimensao2.label" default="Conceito: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "conceitoDimensao2")}</td>

                        </tr>
                            </table>
                            
                            <br>
                            <table> <b>Dimensão 3: INFRAESTRUTURA</b>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.relatoDimensao3.label" default="Relato: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "relatoDimensao3")}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.pesoDimensao3.label" default="Peso: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "pesoDimensao3") + "%"}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.conceitoDimensao3.label" default="Conceito: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "conceitoDimensao3")}</td>

                        </tr>
                            </table>
                                
                        <br>    
                        <table>  <b>Dimensão 4: REQUISITOS LEGAIS E NORMATIVOS </b>      
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.relatoDimensao4.label" default="Relato: " /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "relatoDimensao4")}</td>

                        </tr>
                        </table>
                        <br>
                        <table>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.conceitoFinal.label" default="Conceito Final" /></td>

                            <td valign="top" class="value">${fieldValue(bean: avaliacaoInstance, field: "conceitoFinal")}</td>

                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.dateStart.label" default="Data de Início: " /></td>

                            <td valign="top" class="value"><g:formatDate date="${avaliacaoInstance?.dateStart} format="dd/MM/yyyy" " /></td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.dateEnd.label" default="Data Fim: " /></td>

                            <td valign="top" class="value"><g:formatDate date="${avaliacaoInstance?.dateEnd}" format="dd/MM/yyyy " /></td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.dateCreated.label" default="Data de Criação: " /></td>

                            <td valign="top" class="value"><g:formatDate date="${avaliacaoInstance?.dateCreated}" format="dd/MM/yyyy " /></td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="avaliacao.lastUpdated.label" default="Ultima Atualização: " /></td>

                            <td valign="top" class="value"><g:formatDate date="${avaliacaoInstance?.lastUpdated}" format="dd/MM/yyyy " /></td>

                        </tr>
                        </table>
                    
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${avaliacaoInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'Editar', default: 'Editar')}" /></span>                    
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'Excluir', default: 'Excluir')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>                                        
                    
                    <g:if test="${avaliacaoInstance.status=='Finalizada'}">
                    <span class="button"><g:actionSubmit class="result" action="getResults" value="${message(code: 'Resultados', default: 'Resultados')}" /></span>
                    </g:if>
                </g:form>
            </div>
        </div>
    </body>
</html>
